package com.ruoyi.smart.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.smart.mapper.SmartInventoryMapper;
import com.ruoyi.smart.domain.SmartInventory;
import com.ruoyi.smart.service.ISmartInventoryService;

/**
 * 库存Service业务层处理
 * 
 * @author minwei
 * @date 2022-04-07
 */
@Service
public class SmartInventoryServiceImpl implements ISmartInventoryService 
{
    @Autowired
    private SmartInventoryMapper smartInventoryMapper;

    /**
     * 查询库存
     * 
     * @param id 库存主键
     * @return 库存
     */
    @Override
    public SmartInventory selectSmartInventoryById(Long id)
    {
        return smartInventoryMapper.selectSmartInventoryById(id);
    }

    /**
     * 查询库存列表
     * 
     * @param smartInventory 库存
     * @return 库存
     */
    @Override
    public List<SmartInventory> selectSmartInventoryList(SmartInventory smartInventory)
    {
        return smartInventoryMapper.selectSmartInventoryList(smartInventory);
    }

    /**
     * 新增库存
     * 
     * @param smartInventory 库存
     * @return 结果
     */
    @Override
    public int insertSmartInventory(SmartInventory smartInventory)
    {
        return smartInventoryMapper.insertSmartInventory(smartInventory);
    }

    /**
     * 修改库存
     * 
     * @param smartInventory 库存
     * @return 结果
     */
    @Override
    public int updateSmartInventory(SmartInventory smartInventory)
    {
        return smartInventoryMapper.updateSmartInventory(smartInventory);
    }

    /**
     * 批量删除库存
     * 
     * @param ids 需要删除的库存主键
     * @return 结果
     */
    @Override
    public int deleteSmartInventoryByIds(Long[] ids)
    {
        return smartInventoryMapper.deleteSmartInventoryByIds(ids);
    }

    /**
     * 删除库存信息
     * 
     * @param id 库存主键
     * @return 结果
     */
    @Override
    public int deleteSmartInventoryById(Long id)
    {
        return smartInventoryMapper.deleteSmartInventoryById(id);
    }
}
